//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/2/25
************************************************************/
    
#include <stdio.h>
#include <string.h>

void left_move(char* arr,int input)
{
    unsigned long len = strlen(arr);
    int i = 0;
    int j = 0;
    char tmp[] ={0};
    
    for(j = 0; j < input%len; j++)
    {
        tmp[0] = arr[0];
        for(i = 0; i < len-1; i++)
        {
            arr[i] = arr[i+1];
        }
        arr[len-1] = tmp[0];
    }
    
    
}

int main()
{
    char arr[] = "ABCDEF";
    printf("%s\n",arr);
    int input = 0;
    printf("请输入左旋的个数:>");
    scanf("%d",&input);
    
    left_move(arr, input);
    
    printf("左旋后为:>%s\n",arr);
    
    return 0;
}

